// pages/bing/bing3/bing3.js
Page({
	data:{
    visit_flag:0,
    visit_info:'',
    config:{
      hospitalClass: 'three_none'
    }
  },

/**
   * 生命周期函数--监听页面跳转
   */
  jumpBtn:function(options){  
    console.log(options);
    
   
    this.setData({
      visit_info:'曾就诊于'+options.detail.value.txtHospital+'的'+ options.detail.value.txtDepartment
    
    })
     wx.navigateTo({
       url:'../bing4/bing4'
    })
  },

  jumpBtn1:function (options) {
    this.setData({
      visit_flag:0,
    })
    wx.navigateTo({
      url:'../bing4/bing4'
    })    
  },

  // 跳转页面时
  onHide: function () {
    var that = this;
    wx.setStorage({
      key:"bing_obj.visit_flag",
      data:this.data.visit_flag ,
      success:function (cus) {
        console.log('写缓存成功',)
      },
      fail:function (error) {
        util.showModel('系统错误','手机系统空间不足')
        return;
      }

      });
    
     wx.setStorage({
      key:"bing_obj.visit_info",
      data:that.data.visit_info ,
      success:function (cus1) {
        console.log(cus1);
      },
      fail:function (error) {
        util.showModel('系统错误','手机系统空间不足')
        return;
      }
      });


  
  },










  /**
   *显示页面在
   */
  showHospital:function(){
    this.setData({
      config: {
        hospitalClass: 'three_show',
        },
        visit_flag:1
    })
  },

  /**
   *隐藏页面
   */
   noneHospital:function(){
   	this.setData({
   		config:{
   			hospitalClass:'three_none',
        visit_flag:0
   		}
   	})
   },

   /**
   *显示按钮
   */
  showNext:function(){
  	this.setData({
  		config:{
  			nextClass:'five_show',
        visit_flag:1
  		}
  	})
  }
  	
})